﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LeederGlobal
{
    public class ApplicationCache
    {
        /// <summary>
        /// 当前用户信息
        /// </summary>
        public static CurrentUserModel CurrentUser { get; set; }
        public static string CurrentUserLoginName
        {
            get
            {
                return CurrentUser.LoginName;
            }
        }

        /// <summary>
        /// 产品名称
        /// </summary>
        public static string ProductName
        {
            get
            {
                return SystemConfiguration.AppName;
            }
        }


        /// <summary>
        /// 当前版本
        /// </summary>
        public static Version CurrentVersion { get; set; }

        /// <summary>
        /// 版本说明
        /// </summary>
        public static string VersionInformation { get; set; }

        /// <summary>
        /// 系统配置
        /// </summary>
        public static SystemConfigurationModel SystemConfiguration { get; set; }

        /// <summary>
        /// 是否启用读写分离
        /// </summary>
        /// <returns></returns>
        public static bool SQLAlwaysOn { get; set; } = false;

        /// <summary>
        /// 是否启用MQ消息队列
        /// </summary>
        /// <returns></returns>
        public static bool EnableMQ { get; set; } = false;

        /// <summary>
        /// MQ服务器URL
        /// </summary>
        /// <returns></returns>
        public static string MQServerURL { get; set; }

        /// <summary>
        /// 系统标识（）
        /// </summary>
        /// <returns></returns>
        public static string AppTag { get; set; }

    }
}
